function [R,y]=createR(r,n)
% n: the number of antennas
% generate according to 36.101

R = eye(n);
if n == 2
	R(1,2) = r;
    R(2,1) = r;
elseif n == 4
	R(1,2) = r^(1/9); R(2,1) = r^(1/9);
	R(1,3) = r^(4/9); R(3,1) = r^(4/9);
	R(2,3) = r^(1/9); R(3,2) = r^(1/9);
	R(2,4) = r^(4/9); R(4,2) = r^(4/9);
	R(3,4) = r^(1/9); R(4,3) = r^(1/9);
	R(1,4) = r; R(4,1) = r;
end
y= 1;
